<template>
    <div class="page_root" :key="queryUpdateFlag" data-page-name="项目菜单管理" data-page-identification="w_0t99ah6jy8">
        <a-spin :spinning="pageLoading.loading" :tip="pageLoading.tip">
            <!-- begin vid_x8nwwx4hgr 全局提示_新建菜单成功 -->
            <!-- end vid_x8nwwx4hgr 全局提示_新建菜单成功 -->
            <!-- begin vid_47bbbopx7s 全局提示_新建菜单失败 -->
            <!-- end vid_47bbbopx7s 全局提示_新建菜单失败 -->
            <!-- begin vid_c9qmws388m 删除 -->
            <a-modal
                class="vid_c9qmws388m"
                v-model:visible="vid_c9qmws388m_props.visible"
                :centered="true"
                :title="'删除'"
                :maskClosable="false"
                :width="320"
                @cancel="handle_vid_c9qmws388m_cancel"
                @ok="handle_vid_c9qmws388m_ok"
            >
                <!-- begin vid_ltkaoya9in 是否删除此内容？ -->
                <span class="vid_ltkaoya9in"> 是否删除此内容？ </span>
                <!-- end vid_ltkaoya9in 是否删除此内容？ -->
            </a-modal>
            <!-- end vid_c9qmws388m 删除 -->
            <!-- begin vid_87aoh1zr33 新建菜单名称 -->
            <a-modal
                class="vid_87aoh1zr33"
                v-model:visible="vid_87aoh1zr33_props.visible"
                :centered="true"
                :title="'新建菜单名称'"
                :maskClosable="false"
                :width="800"
                :okText="'保存'"
                @cancel="handle_vid_87aoh1zr33_cancel"
                @ok="handle_vid_87aoh1zr33_ok"
            >
                <!-- begin vid_ksilstvcwn 表单容器_sprgzl8zs4 -->
                <a-form
                    ref="vid_ksilstvcwn_ref"
                    class="vid_ksilstvcwn"
                    :model="w_ujbi2r2ksq"
                    :formModel="vid_ksilstvcwn_props.formModel"
                >
                    <!-- begin vid_j2aucldu17 表单项容器_eyefz5fzkj -->
                    <a-form-item
                        name="t_bta0eofmru"
                        :rules="w_ujbi2r2ksq_rules[`t_bta0eofmru`]"
                        class="vid_j2aucldu17"
                        :label-col="{ 'span': 24 }"
                        :wrapper-col="{ 'span': 24 }"
                    >
                        <!-- begin vid_fr3x0wobcc 新建菜单动作列表 -->
                        <al-action-list
                            data-field-key="t_bta0eofmru"
                            ref="vid_fr3x0wobcc_ref"
                            class="vid_fr3x0wobcc"
                            v-model:dataSource="w_ujbi2r2ksq.t_bta0eofmru"
                            v-model:extendDataSource="vid_fr3x0wobcc_props.dataSource"
                            v-model:current="vid_fr3x0wobcc_props.current"
                            v-model:currentIndex="vid_fr3x0wobcc_props.currentIndex"
                            :deleteLineHeight="60"
                        >
                            <template #default="vid_fr3x0wobcc_dataItem">
                                <!-- begin vid_2n61qj06a9 布局容器_og9uat3tra -->
                                <a-row
                                    :data-cycle-index="vid_fr3x0wobcc_dataItem.cycleIndex"
                                    class="vid_2n61qj06a9"
                                    :slots="'12:12'"
                                >
                                    <a-col :span="12">
                                        <!-- begin vid_qx4ksiq011 表单项容器_166fmwm540 -->
                                        <a-form-item
                                            :name="setSubFormName(vid_fr3x0wobcc_dataItem, `projectName`)"
                                            :rules="w_ujbi2r2ksq_rules[`projectName`]"
                                            :data-cycle-index="vid_fr3x0wobcc_dataItem.cycleIndex"
                                            class="vid_qx4ksiq011"
                                            :label-col="{ 'span': 6 }"
                                            :wrapper-col="{ 'span': 18 }"
                                        >
                                            <!-- begin vid_70mhdjsttp 新建菜单下拉框 -->
                                            <a-input
                                                autocomplete="off"
                                                :data-cycle-index="vid_fr3x0wobcc_dataItem.cycleIndex"
                                                class="vid_70mhdjsttp"
                                                v-model:value="vid_fr3x0wobcc_dataItem.dataItem.projectName"
                                                :placeholder="'请输入菜单名称'"
                                            />
                                            <!-- end vid_70mhdjsttp 新建菜单下拉框 -->
                                            <template #label>
                                                <!-- begin vid_shq7ipp9vk 简单文本_05ii6pmjg2 -->
                                                <span
                                                    :data-cycle-index="vid_fr3x0wobcc_dataItem.cycleIndex"
                                                    class="vid_shq7ipp9vk"
                                                >
                                                    菜单名称
                                                </span>
                                                <!-- end vid_shq7ipp9vk 简单文本_05ii6pmjg2 -->
                                            </template>
                                        </a-form-item>
                                        <!-- end vid_qx4ksiq011 表单项容器_166fmwm540 -->
                                    </a-col>
                                    <a-col :span="12">
                                        <!-- begin vid_edw9s86602 表单项容器_9t49dp7r4g -->
                                        <a-form-item
                                            :name="setSubFormName(vid_fr3x0wobcc_dataItem, `parentId`)"
                                            :rules="w_ujbi2r2ksq_rules[`parentId`]"
                                            :data-cycle-index="vid_fr3x0wobcc_dataItem.cycleIndex"
                                            class="vid_edw9s86602"
                                            :label-col="{ 'span': 6 }"
                                            :wrapper-col="{ 'span': 18 }"
                                        >
                                            <!-- begin vid_5mtxzq13ji 下拉框_0edvz0tgg9 -->
                                            <a-select
                                                :data-cycle-index="vid_fr3x0wobcc_dataItem.cycleIndex"
                                                class="vid_5mtxzq13ji"
                                                :getPopupContainer="node => node.parentNode"
                                                v-model:value="vid_fr3x0wobcc_dataItem.dataItem.parentId"
                                                :showArrow="true"
                                                :filterOption="
                                                    (input, option) => {
                                                        return (
                                                            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                        )
                                                    }
                                                "
                                                :dropdownMatchSelectWidth="true"
                                                :showSearch="true"
                                                :placeholder="'请选择父级菜单'"
                                                :searchValue="vid_5mtxzq13ji_props.searchValue"
                                                :selected="vid_5mtxzq13ji_props.selected"
                                                :options="vid_5mtxzq13ji_options()"
                                                @change="handle_vid_5mtxzq13ji_change"
                                                @search="handle_vid_5mtxzq13ji_search"
                                            />
                                            <!-- end vid_5mtxzq13ji 下拉框_0edvz0tgg9 -->
                                            <template #label>
                                                <!-- begin vid_3pydco233p 父级菜单 -->
                                                <span
                                                    :data-cycle-index="vid_fr3x0wobcc_dataItem.cycleIndex"
                                                    class="vid_3pydco233p"
                                                >
                                                    父级菜单
                                                </span>
                                                <!-- end vid_3pydco233p 父级菜单 -->
                                            </template>
                                        </a-form-item>
                                        <!-- end vid_edw9s86602 表单项容器_9t49dp7r4g -->
                                    </a-col>
                                </a-row>
                                <!-- end vid_2n61qj06a9 布局容器_og9uat3tra -->
                            </template>
                        </al-action-list>
                        <!-- end vid_fr3x0wobcc 新建菜单动作列表 -->
                    </a-form-item>
                    <!-- end vid_j2aucldu17 表单项容器_eyefz5fzkj -->
                </a-form>
                <!-- end vid_ksilstvcwn 表单容器_sprgzl8zs4 -->
            </a-modal>
            <!-- end vid_87aoh1zr33 新建菜单名称 -->
            <!-- begin vid_wyzo0u316u 编辑菜单名称 -->
            <a-modal
                class="vid_wyzo0u316u"
                v-model:visible="vid_wyzo0u316u_props.visible"
                :centered="true"
                :title="'编辑菜单名称'"
                :maskClosable="false"
                :okText="'保存'"
                @cancel="handle_vid_wyzo0u316u_cancel"
                @ok="handle_vid_wyzo0u316u_ok"
            >
                <!-- begin vid_2pb9u9mnm9 编辑菜单表单容器 -->
                <a-form
                    ref="vid_2pb9u9mnm9_ref"
                    class="vid_2pb9u9mnm9"
                    :model="t_fkosa1khu3"
                    :formModel="vid_2pb9u9mnm9_props.formModel"
                >
                    <!-- begin vid_cgcgfslucj 布局容器_kkdhl9vl2k -->
                    <a-row class="vid_cgcgfslucj" :slots="'24:24'">
                        <a-col :span="24">
                            <!-- begin vid_3sdwc3e0im 表单项容器_2xf1i59hag -->
                            <a-form-item
                                name="k_8jcaxipcmd"
                                :rules="t_fkosa1khu3_rules[`k_8jcaxipcmd`]"
                                class="vid_3sdwc3e0im"
                                :label-col="{ 'span': 4 }"
                                :wrapper-col="{ 'span': 20 }"
                            >
                                <!-- begin vid_tnc33fbtqi 编辑-菜单名称 -->
                                <a-input
                                    autocomplete="off"
                                    class="vid_tnc33fbtqi"
                                    v-model:value="t_fkosa1khu3.k_8jcaxipcmd"
                                    :placeholder="'请输入菜单名称'"
                                />
                                <!-- end vid_tnc33fbtqi 编辑-菜单名称 -->
                                <template #label>
                                    <!-- begin vid_ozyzzl00en 简单文本_id0oezj31t -->
                                    <span class="vid_ozyzzl00en"> 菜单名称 </span>
                                    <!-- end vid_ozyzzl00en 简单文本_id0oezj31t -->
                                </template>
                            </a-form-item>
                            <!-- end vid_3sdwc3e0im 表单项容器_2xf1i59hag -->
                        </a-col>
                        <a-col :span="24">
                            <!-- begin vid_78u96scdu5 表单项容器_do417514vz -->
                            <a-form-item
                                name="y_afk8lvgals"
                                :rules="t_fkosa1khu3_rules[`y_afk8lvgals`]"
                                class="vid_78u96scdu5"
                                :label-col="{ 'span': 4 }"
                                :wrapper-col="{ 'span': 20 }"
                            >
                                <!-- begin vid_lrhlm57xoi 编辑-父级菜单 -->
                                <a-select
                                    class="vid_lrhlm57xoi"
                                    :getPopupContainer="node => node.parentNode"
                                    v-model:value="t_fkosa1khu3.y_afk8lvgals"
                                    :showArrow="true"
                                    :filterOption="
                                        (input, option) => {
                                            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        }
                                    "
                                    :dropdownMatchSelectWidth="true"
                                    :showSearch="true"
                                    :placeholder="'请选择父级菜单'"
                                    :searchValue="vid_lrhlm57xoi_props.searchValue"
                                    :selected="vid_lrhlm57xoi_props.selected"
                                    :options="vid_lrhlm57xoi_options()"
                                    @change="handle_vid_lrhlm57xoi_change"
                                    @search="handle_vid_lrhlm57xoi_search"
                                />
                                <!-- end vid_lrhlm57xoi 编辑-父级菜单 -->
                                <template #label>
                                    <!-- begin vid_ww4t6z7mse 简单文本_e04djpys3j -->
                                    <span class="vid_ww4t6z7mse"> 父级菜单 </span>
                                    <!-- end vid_ww4t6z7mse 简单文本_e04djpys3j -->
                                </template>
                            </a-form-item>
                            <!-- end vid_78u96scdu5 表单项容器_do417514vz -->
                        </a-col>
                    </a-row>
                    <!-- end vid_cgcgfslucj 布局容器_kkdhl9vl2k -->
                </a-form>
                <!-- end vid_2pb9u9mnm9 编辑菜单表单容器 -->
            </a-modal>
            <!-- end vid_wyzo0u316u 编辑菜单名称 -->
            <!-- begin vid_31k32tisnj 容器_qj47q0l370 -->
            <al-box class="vid_31k32tisnj">
                <!-- begin vid_pqhid1j9xl 我的日报筛选表单容器 -->
                <a-form
                    ref="vid_pqhid1j9xl_ref"
                    class="vid_pqhid1j9xl"
                    :model="h_4si95erbps"
                    :formModel="vid_pqhid1j9xl_props.formModel"
                >
                    <!-- begin vid_hos2yxmizc 布局容器_我的日报筛选 -->
                    <a-row class="vid_hos2yxmizc" :slots="'6:6:6:6'">
                        <a-col :span="6">
                            <!-- begin vid_w11askucjq 表单项容器_8jve5dotnm -->
                            <a-form-item
                                name="h_k7wv7blab2"
                                :rules="h_4si95erbps_rules[`h_k7wv7blab2`]"
                                class="vid_w11askucjq"
                                :label-col="{ 'span': 4 }"
                                :wrapper-col="{ 'span': 20 }"
                            >
                                <!-- begin vid_90gelfzben 筛选菜单名称 -->
                                <a-select
                                    class="vid_90gelfzben"
                                    :getPopupContainer="node => node.parentNode"
                                    v-model:value="h_4si95erbps.h_k7wv7blab2"
                                    :showArrow="true"
                                    :filterOption="
                                        (input, option) => {
                                            return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        }
                                    "
                                    :dropdownMatchSelectWidth="true"
                                    :showSearch="true"
                                    :placeholder="'请选择菜单名称'"
                                    :searchValue="vid_90gelfzben_props.searchValue"
                                    :selected="vid_90gelfzben_props.selected"
                                    :options="vid_90gelfzben_options()"
                                    @change="handle_vid_90gelfzben_change"
                                    @search="handle_vid_90gelfzben_search"
                                />
                                <!-- end vid_90gelfzben 筛选菜单名称 -->
                                <template #label>
                                    <!-- begin vid_mf1ps8gyfl 菜单名称 -->
                                    <span class="vid_mf1ps8gyfl"> 菜单名称 </span>
                                    <!-- end vid_mf1ps8gyfl 菜单名称 -->
                                </template>
                            </a-form-item>
                            <!-- end vid_w11askucjq 表单项容器_8jve5dotnm -->
                        </a-col>
                        <a-col :span="6">
                            <!-- begin vid_7kivq6lkr0 查询 -->
                            <a-button class="vid_7kivq6lkr0" :type="'primary'" @click="handle_vid_7kivq6lkr0_click">
                                查询
                            </a-button>
                            <!-- end vid_7kivq6lkr0 查询 -->
                            <!-- begin vid_0lxg6f0wv1 重置 -->
                            <a-button class="vid_0lxg6f0wv1" @click="handle_vid_0lxg6f0wv1_click"> 重置 </a-button>
                            <!-- end vid_0lxg6f0wv1 重置 -->
                        </a-col>
                        <a-col :span="6" />
                        <a-col :span="6" />
                    </a-row>
                    <!-- end vid_hos2yxmizc 布局容器_我的日报筛选 -->
                </a-form>
                <!-- end vid_pqhid1j9xl 我的日报筛选表单容器 -->
                <!-- begin vid_es8qqkl0xe 容器_bbf6z6856z -->
                <al-box class="vid_es8qqkl0xe">
                    <!-- begin vid_6iwz2ocdim 布局容器_1xabkgwyuj -->
                    <a-row class="vid_6iwz2ocdim" :slots="'12:12'">
                        <a-col :span="12">
                            <!-- begin vid_dghk1oe6d2 容器_b1gbwli7nf -->
                            <al-box class="vid_dghk1oe6d2">
                                <!-- begin vid_19ogtmwtkw 菜单列表 -->
                                <span class="vid_19ogtmwtkw"> 菜单列表 </span>
                                <!-- end vid_19ogtmwtkw 菜单列表 -->
                            </al-box>
                            <!-- end vid_dghk1oe6d2 容器_b1gbwli7nf -->
                        </a-col>
                        <a-col :span="12">
                            <!-- begin vid_ipdla4ayd4 容器_vsxp8xzvkz -->
                            <al-box class="vid_ipdla4ayd4">
                                <!-- begin vid_t1518w6pxe 新建 -->
                                <a-button class="vid_t1518w6pxe" :type="'primary'" @click="handle_vid_t1518w6pxe_click">
                                    新建
                                </a-button>
                                <!-- end vid_t1518w6pxe 新建 -->
                            </al-box>
                            <!-- end vid_ipdla4ayd4 容器_vsxp8xzvkz -->
                        </a-col>
                    </a-row>
                    <!-- end vid_6iwz2ocdim 布局容器_1xabkgwyuj -->
                    <!-- begin vid_kojlvo03hy 项目菜单表格 -->
                    <!-- 项目菜单表格 -->
                    <a-table
                        class="vid_kojlvo03hy"
                        :totalNumber="vid_kojlvo03hy_props.totalNumber"
                        :bordered="true"
                        :editRowSaveLoading="vid_kojlvo03hy_props.editRowSaveLoading"
                        :sorter="vid_kojlvo03hy_props.sorter"
                        :currentRow="vid_kojlvo03hy_props.currentRow"
                        :selectedRowList="vid_kojlvo03hy_props.selectedRowList"
                        :data-source="vid_kojlvo03hy_options()"
                        @change="handle_vid_kojlvo03hy_change"
                        :columns="vid_kojlvo03hy_columns"
                        :pagination="vid_kojlvo03hy_pagination"
                        row-key="id"
                        @resizeColumn="(w, col) => handleResizeColumn(w, col, 'vid_kojlvo03hy')"
                        :scroll="{ x: 'max-content', scrollToFirstRowOnChange: true }"
                        :row-class-name="
                            (_record, index) => (index % 2 === 1 ? 'table-striped-even' : 'table-striped-odd')
                        "
                    >
                        <template #headerCell="{ title, column }">
                            <TableHeaderCell :title="title" :column="column" />
                        </template>
                        <template #bodyCell="{ text, column, record, index }">
                            <!-- 操作列 -->
                            <div v-if="column.dataIndex === 'vid_kojlvo03hy_operation'" class="operation-cell">
                                <!-- 默认分组 -->
                                <span>
                                    <a-button type="link" @click="handle_vid_kojlvo03hy_clickBtn_h1xqwdg2zp(record)"
                                        >编辑</a-button
                                    >
                                    <a-button type="link" @click="handle_vid_kojlvo03hy_clickBtn_7qr0xhf0yl(record)"
                                        >删除</a-button
                                    >
                                </span>
                            </div>

                            <!-- 序号列 -->
                            <template v-if="column && column.dataIndex === 'vid_kojlvo03hy_serialNumber'">
                                {{ index + 1 }}
                            </template>
                            <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"菜单名称"} 列内容 -->
                            <template v-if="column.dataIndex === 'projectName' && !column.customRender">
                                <text-table-cell
                                    :rowData="record"
                                    :conditionValueMap="vid_kojlvo03hy_props.boundaryValueMap"
                                    :dataSource="vid_kojlvo03hy_props.contentDataSource[column.dataIndex]"
                                    :columnsConfig="column"
                                    :value="text"
                                />
                            </template>
                            <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"父级菜单"} 列内容 -->
                            <template v-if="column.dataIndex === 'parentName' && !column.customRender">
                                <text-table-cell
                                    :rowData="record"
                                    :conditionValueMap="vid_kojlvo03hy_props.boundaryValueMap"
                                    :dataSource="vid_kojlvo03hy_props.contentDataSource[column.dataIndex]"
                                    :columnsConfig="column"
                                    :value="text"
                                />
                            </template>
                            <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"添加时间"} 列内容 -->
                            <template v-if="column.dataIndex === 'createTime' && !column.customRender">
                                <text-table-cell
                                    :rowData="record"
                                    :conditionValueMap="vid_kojlvo03hy_props.boundaryValueMap"
                                    :dataSource="vid_kojlvo03hy_props.contentDataSource[column.dataIndex]"
                                    :columnsConfig="column"
                                    :value="text"
                                />
                            </template>
                            <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"最近更新时间"} 列内容 -->
                            <template v-if="column.dataIndex === 'updateTime' && !column.customRender">
                                <text-table-cell
                                    :rowData="record"
                                    :conditionValueMap="vid_kojlvo03hy_props.boundaryValueMap"
                                    :dataSource="vid_kojlvo03hy_props.contentDataSource[column.dataIndex]"
                                    :columnsConfig="column"
                                    :value="text"
                                />
                            </template>
                            <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"id"} 列内容 -->
                            <template v-if="column.dataIndex === 'projectId' && !column.customRender">
                                <text-table-cell
                                    :rowData="record"
                                    :conditionValueMap="vid_kojlvo03hy_props.boundaryValueMap"
                                    :dataSource="vid_kojlvo03hy_props.contentDataSource[column.dataIndex]"
                                    :columnsConfig="column"
                                    :value="text"
                                />
                            </template>
                            <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"父级ID"} 列内容 -->
                            <template v-if="column.dataIndex === 'parentId' && !column.customRender">
                                <text-table-cell
                                    :rowData="record"
                                    :conditionValueMap="vid_kojlvo03hy_props.boundaryValueMap"
                                    :dataSource="vid_kojlvo03hy_props.contentDataSource[column.dataIndex]"
                                    :columnsConfig="column"
                                    :value="text"
                                />
                            </template>
                        </template>
                    </a-table>
                    <!-- end vid_kojlvo03hy 项目菜单表格 -->
                </al-box>
                <!-- end vid_es8qqkl0xe 容器_bbf6z6856z -->
            </al-box>
            <!-- end vid_31k32tisnj 容器_qj47q0l370 -->
        </a-spin>
    </div>
</template>
<script setup lang="tsx">
    import {
        h,
        ref,
        reactive,
        toRaw,
        markRaw,
        watch,
        computed,
        onBeforeMount,
        onMounted,
        onBeforeUnmount,
        onUnmounted,
        onActivated,
        onDeactivated
    } from 'vue'
    import { useRoute, useRouter } from 'vue-router'
    const router = useRouter()
    const route = useRoute()
    import { get, post, put, del, request, requestWithHeaders } from '@/utils/http/Axios'
    import {
        cloneDeep,
        localGet,
        merge,
        getDifferenceArray,
        traversalTreeStructure,
        checkCaseCondition,
        renderStringInTemplate,
        handleBreadcrumbJump,
        throttle,
        permission,
        getComponentParamsValue
    } from '@/utils/index'
    import { isNullOrEmpty, isEmptyArr, isNullOrUnDef, isContained, isArray, isEmpty, isObject } from '@/utils/is'
    import dayjs from 'dayjs'
    import { getPagePcChartsDataSourceConvert } from '@/utils/chart'
    import { message, notification, Modal } from 'ant-design-vue'
    import { propertyFormatByNumber, propertyFormatByPercentage, propertyFormatByDate } from '@/utils/format'
    import colorTheme from '@/design/custom-theme.json'
    /*** PUBLISH_EXEGESIS ***
 import UserTableRecords from '@/model/UserTableRecords';
 import { getAppBaseUrl } from '@/utils/index';
 import { sendToken } from "@/hooks/useIframeToken";
 import { useSystemStore } from "@/store/modules/system";
 const systemStore = useSystemStore();
 *** PUBLISH_EXEGESIS ***/

    import TextTableCell from '@/components/page/tableCell/text.vue'
    import TooltipTableCell from '@/components/page/tableCell/tooltip.vue'
    import NumberTableCell from '@/components/page/tableCell/number.vue'
    import ProgressTableCell from '@/components/page/tableCell/progress.vue'
    import OptionsTableCell from '@/components/page/tableCell/options.vue'
    import MultipleOptionsTableCell from '@/components/page/tableCell/multipleOptions.vue'
    import DatePickerTableCell from '@/components/page/tableCell/datePicker.vue'
    import RangePickerTableCell from '@/components/page/tableCell/rangePicker.vue'
    import RangeNumberTableCell from '@/components/page/tableCell/rangeNumber.vue'
    import BoolTableCell from '@/components/page/tableCell/bool.vue'
    import TableHeaderCell from '@/components/page/TableHeaderCell.vue'

    // 获取传入的流程ID和组件参数
    const props = defineProps({
        'processInstanceId': {
            type: [String, Number, Boolean],
            default: undefined
        }
    })
    const immediateWatch = (source, callback) => {
        watch(source, callback, { deep: true, immediate: true })
    }

    /* -------------------------- 属性定义 -------------------------- */

    const setTimeOutList = []
    const pageLoading = reactive({
        loading: false,
        tip: undefined
    })
    const authInfo = localGet('app-user-store')

    const vid_x8nwwx4hgr_props = reactive({
        show: false,
        type: 'success',
        content: '新建成功',
        duration: 3
    })

    const vid_47bbbopx7s_props = reactive({
        show: false,
        type: 'error',
        content: '',
        duration: 3
    })

    const vid_c9qmws388m_props = reactive({
        visible: false,
        confirmLoading: undefined
    })

    const vid_87aoh1zr33_props = reactive({
        visible: false,
        confirmLoading: undefined
    })

    const vid_ksilstvcwn_props = reactive({
        formModel: { 't_bta0eofmru': '', 'parentId': '', 'projectName': '' }
    })

    const vid_fr3x0wobcc_props = reactive({
        dataSource: [{ 'projectName': '', 'parentId': '' }],
        current: { 'projectName': '', 'parentId': '' },
        currentIndex: -1
    })

    const vid_5mtxzq13ji_props = reactive({
        selected: { 'label': '', 'value': '', 'option': {} },
        searchValue: undefined,
        value: undefined
    })

    const vid_70mhdjsttp_props = reactive({
        value: undefined
    })

    const vid_wyzo0u316u_props = reactive({
        visible: false,
        confirmLoading: undefined
    })

    const vid_2pb9u9mnm9_props = reactive({
        formModel: { 'y_afk8lvgals': '', 'k_8jcaxipcmd': '' }
    })

    const vid_lrhlm57xoi_props = reactive({
        selected: { 'label': '', 'value': '', 'option': {} },
        searchValue: undefined,
        value: undefined
    })

    const vid_tnc33fbtqi_props = reactive({
        value: undefined
    })

    const vid_pqhid1j9xl_props = reactive({
        formModel: { 'h_k7wv7blab2': '' }
    })

    const vid_90gelfzben_props = reactive({
        selected: { 'label': '', 'value': '', 'option': {} },
        searchValue: undefined,
        value: undefined
    })

    const vid_kojlvo03hy_props = reactive({
        systemSort: [],
        sorter: {},
        editRowSaveLoading: {},
        currentRow: {
            'projectName': '',
            'parentName': '',
            'createTime': '',
            'updateTime': '',
            'projectId': '',
            'parentId': ''
        },
        selectedRowList: {
            'parentName': [],
            'createTime': [],
            'updateTime': [],
            'projectName': [],
            'projectId': [],
            'parentId': []
        },
        totalNumber: undefined,
        rt_tableConfig: {
            'layout': { 'showHeader': true, 'sticky': false, 'operationColumnFixed': 'default' },
            'pagination': {
                'current': 1,
                'pageSizeOptions': '10,20,30,40',
                'enable': true,
                'showTotal': true,
                'hideOnSinglePage': false,
                'pageSize': '15',
                'simple': false,
                'sync': true,
                'showQuickJumper': false,
                'showSizeChanger': false
            },
            'scroll': { 'x': 'max-content', 'y': '', 'scrollToFirstRowOnChange': true },
            'style': {
                'contentStyle': {
                    'borderColor': '#D9D9D9',
                    'enableContentStyle': true,
                    'fontFamily': 'arial, helvetica, "microsoft yahei"',
                    'lintHeight': 40,
                    'borderWidth': 1,
                    'evenLineBackColor': '#F8FAFC',
                    'textWeight': '400',
                    'fontSize': 14,
                    'oddLineBackColor': '#FFFFFF',
                    'textColor': '#262626'
                },
                'paginationStyle': { 'layout': 'bottomRight', 'size': 'default' },
                'headerStyle': {
                    'borderColor': '#D9D9D9',
                    'backgroundColor': '#3875FF',
                    'fontFamily': 'arial, helvetica, "microsoft yahei"',
                    'lintHeight': 40,
                    'borderWidth': 1,
                    'textWeight': '600',
                    'fontSize': 14,
                    'enableTextStyle': true,
                    'textColor': '#FFFFFF'
                }
            },
            'basic': {
                'rowSelection': false,
                'rowEdit': { 'cancelText': '取消', 'editText': '编辑', 'saveText': '保存' },
                'title': '',
                'showSequenceNumber': false,
                'rowKey': 'id'
            }
        },
        columnList: [
            {
                id: 'tq4zo6ier2',
                dataIndex: 'projectName',
                headerComment: false,
                title: '菜单名称',
                ellipsis: false,
                headerOverflow: 'ellipsis',
                contentAlign: 'left',
                customHeaderCell: () => ({ style: { 'text-align': 'left' } }),
                rowEditConditions: [],
                contentType: 'TEXT',
                contentConfig: { 'conditionStyle': [], 'boolConfig': 'collection' },
                // 使用插槽的列，设置单元格padding为0，padding样式在内容插槽中已加，以便内容插槽设置背景色时可以占满整个单元格；该样式会在计算属性生成列配置时加入customCell
                customCellStyle: { padding: 0 },
                resizable: true
            },
            {
                id: 'ljmi0gvcva',
                dataIndex: 'parentName',
                headerComment: false,
                title: '父级菜单',
                ellipsis: false,
                headerOverflow: 'ellipsis',
                contentAlign: 'left',
                customHeaderCell: () => ({ style: { 'text-align': 'left' } }),
                rowEditConditions: [],
                contentType: 'TEXT',
                contentConfig: { 'conditionStyle': [], 'boolConfig': 'collection' },
                // 使用插槽的列，设置单元格padding为0，padding样式在内容插槽中已加，以便内容插槽设置背景色时可以占满整个单元格；该样式会在计算属性生成列配置时加入customCell
                customCellStyle: { padding: 0 },
                resizable: true
            },
            {
                id: 'j3yxps4o0x',
                dataIndex: 'createTime',
                headerComment: false,
                title: '添加时间',
                ellipsis: false,
                headerOverflow: 'ellipsis',
                contentAlign: 'left',
                customHeaderCell: () => ({ style: { 'text-align': 'left' } }),
                rowEditConditions: [],
                contentType: 'TEXT',
                contentConfig: { 'conditionStyle': [], 'boolConfig': 'collection' },
                // 使用插槽的列，设置单元格padding为0，padding样式在内容插槽中已加，以便内容插槽设置背景色时可以占满整个单元格；该样式会在计算属性生成列配置时加入customCell
                customCellStyle: { padding: 0 },
                sorter: (rowA, rowB) => {
                    return rowA.createTime - rowB.createTime
                },
                resizable: true
            },
            {
                id: 'zd2z85y0ic',
                dataIndex: 'updateTime',
                headerComment: false,
                title: '最近更新时间',
                ellipsis: false,
                headerOverflow: 'ellipsis',
                contentAlign: 'left',
                customHeaderCell: () => ({ style: { 'text-align': 'left' } }),
                rowEditConditions: [],
                contentType: 'TEXT',
                contentConfig: { 'conditionStyle': [], 'boolConfig': 'collection' },
                // 使用插槽的列，设置单元格padding为0，padding样式在内容插槽中已加，以便内容插槽设置背景色时可以占满整个单元格；该样式会在计算属性生成列配置时加入customCell
                customCellStyle: { padding: 0 },
                sorter: (rowA, rowB) => {
                    return rowA.updateTime - rowB.updateTime
                },
                resizable: true
            },
            {
                dataIndex: 'vid_kojlvo03hy_operation',
                title: '操作'
            }
        ],
        rawColumnList: [],
        // 进行行合并所需的排序规则，必须将其加到排序字段的前面，以实现合并单元格
        rowMergeSort: [],
        // 完整的排序规则：需要将行合并的排序规则和排序字段的排序规则赋给该属性；调接口时会使用其作为排序条件
        systemSort: [],
        // 条件格式需要的边界值映射：key为边界值id，value为边界值数据
        boundaryValueMap: {},
        // 表格单元格内容渲染需要的外部数据源：key为列，value为该列单元格的外部数据源配置
        contentDataSource: {}
    })
    // ---------------------------- 定义模型数据 ----------------------------

    const w_ujbi2r2ksq = reactive({ 't_bta0eofmru': [{}] })

    const t_fkosa1khu3 = reactive({})

    const h_4si95erbps = reactive({})

    // ============================ 定义模型数据 ============================

    const w_ujbi2r2ksq_rules = reactive({
        projectName: [{ required: true, message: '请输入菜单名称!', trigger: 'blur' }]
    })

    const t_fkosa1khu3_rules = reactive({
        k_8jcaxipcmd: [{ required: true, message: '请输入菜单名称!', trigger: 'blur' }]
    })

    const h_4si95erbps_rules = reactive({})

    // 处理校验
    const setSubFormName = (parentInfo, name) => {
        return [parentInfo.parents, parentInfo.cycleIndex, name]
    }

    const vid_5mtxzq13ji_options_raw = ref([])

    const vid_5mtxzq13ji_options = computed(() => {
        return (dataSource = vid_5mtxzq13ji_options_raw.value) => {
            return (dataSource || []).map(item => {
                return {
                    ...item,
                    value: item.projectId,
                    disabled: !!item.disabled,
                    label: item.projectName
                }
            })
        }
    })

    const vid_lrhlm57xoi_options_raw = ref([])

    const vid_lrhlm57xoi_options = computed(() => {
        return (dataSource = vid_lrhlm57xoi_options_raw.value) => {
            return (dataSource || []).map(item => {
                return {
                    ...item,
                    value: item.projectId,
                    disabled: !!item.disabled,
                    label: item.projectName
                }
            })
        }
    })

    const vid_90gelfzben_options_raw = ref([])

    const vid_90gelfzben_options = computed(() => {
        return (dataSource = vid_90gelfzben_options_raw.value) => {
            return (dataSource || []).map(item => {
                return {
                    ...item,
                    value: item.projectId,
                    disabled: !!item.disabled,
                    label: item.projectName
                }
            })
        }
    })

    const vid_kojlvo03hy_options_raw = ref([])

    const vid_kojlvo03hy_options = computed(() => {
        return () => vid_kojlvo03hy_options_raw.value
    })

    // 图表组件 下拉框_0edvz0tgg9 条件格式数据依赖
    const vid_5mtxzq13ji_chartConditionDependencyMap = ref({})
    // 图表组件 编辑-父级菜单 条件格式数据依赖
    const vid_lrhlm57xoi_chartConditionDependencyMap = ref({})
    // 图表组件 筛选菜单名称 条件格式数据依赖
    const vid_90gelfzben_chartConditionDependencyMap = ref({})
    // 图表组件 项目菜单表格 条件格式数据依赖
    const vid_kojlvo03hy_chartConditionDependencyMap = ref({})
    /* ========================== 属性定义 ========================== */

    /* -------------------------- 元素数据引用 -------------------------- */
    // 组件 表单容器_sprgzl8zs4 ref 的引用
    const vid_ksilstvcwn_ref = ref(null)
    // 组件 新建菜单动作列表 ref 的引用
    const vid_fr3x0wobcc_ref = ref(null)
    // 组件 编辑菜单表单容器 ref 的引用
    const vid_2pb9u9mnm9_ref = ref(null)
    // 组件 我的日报筛选表单容器 ref 的引用
    const vid_pqhid1j9xl_ref = ref(null)

    /* ========================== 元素数据引用 ========================== */

    /* -------------------------- 页面数据 -------------------------- */

    // 页面数据 下拉框项目名称
    const dataConnector_conn_a0exqfve8p_response = ref()
    const dataConnector_conn_a0exqfve8p = async (additionParams = {}) => {
        const exec = async () => {
            // 获取参数
            const params = {
                modifiedTime: undefined,
                salerName: undefined,
                deliveryTime: undefined,
                departmentId: undefined,
                projectType: undefined,
                description: undefined,
                pageSize: undefined,
                delFlag: undefined,
                preSalesCode: undefined,
                plName: undefined,
                projectStakeholders: undefined,
                attachment: undefined,
                projectCode: undefined,
                updateBy: undefined,
                pageNo: undefined,
                createdTime: undefined,
                startTime: undefined,
                deliverCode: undefined,
                taskStatus: undefined,
                departmentName: undefined,
                ppmProjectFormList: undefined,
                projectNumber: undefined,
                acceptanceTime: undefined,
                updateTime: undefined,
                pmName: undefined,
                nodeType: undefined,
                parentId: undefined,
                ppmEnclosureInfoList: undefined,
                createBy: undefined,
                createTime: undefined,
                endTime: undefined,
                projectName: undefined,
                salerNames: undefined,
                projectId: undefined
            }

            // 注入附加的参数
            try {
                merge(params, additionParams)
            } catch (error) {
                console.log(error)
            }

            // 判断加载提示

            // 处理URL
            let url = '/solution-ppm/api/v2/built-in-system-ppm/project/menu/getPpmProjectMenu'
            // 替换url中的变量

            // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
            Object.keys(params).forEach(key => {
                if (params[key] === null) {
                    delete params[key]
                } else if (Object.prototype.toString.call(params[key]) === '[object Object]') {
                    Object.keys(params[key]).forEach(childKey => {
                        if (
                            params[key][childKey] === null ||
                            (Array.isArray(params[key][childKey]) &&
                                params[key][childKey].length === 1 &&
                                isNullOrUnDef(params[key][childKey]?.[0]))
                        ) {
                            delete params[key][childKey]
                        }
                    })
                }
            })
            return post(url, params, {
                headers: undefined
            })
                .then(async resp => {
                    dataConnector_conn_a0exqfve8p_response.value = resp

                    return resp
                })
                .catch(async e => {
                    return Promise.reject(e)
                })
                .finally(async () => {})
        }

        return await exec()
    }

    // 页面数据 创建项目菜单
    const dataConnector_conn_xmaiizwhix_response = ref()
    const dataConnector_conn_xmaiizwhix = async (additionParams = {}) => {
        const exec = async () => {
            // 获取参数
            const params = {
                modifiedTime: undefined,
                salerName: undefined,
                deliveryTime: undefined,
                departmentId: undefined,
                projectType: undefined,
                description: undefined,
                pageSize: undefined,
                delFlag: undefined,
                preSalesCode: undefined,
                plName: undefined,
                projectStakeholders: undefined,
                attachment: undefined,
                projectCode: undefined,
                updateBy: null,
                pageNo: undefined,
                createdTime: undefined,
                startTime: undefined,
                deliverCode: undefined,
                taskStatus: undefined,
                departmentName: undefined,
                ppmProjectFormList: vid_fr3x0wobcc_props?.dataSource,
                projectNumber: undefined,
                acceptanceTime: undefined,
                updateTime: undefined,
                pmName: undefined,
                nodeType: undefined,
                parentId: undefined,
                ppmEnclosureInfoList: undefined,
                createBy: null,
                createTime: undefined,
                endTime: undefined,
                projectName: undefined,
                salerNames: undefined,
                projectId: undefined
            }

            // 注入附加的参数
            try {
                merge(params, additionParams)
            } catch (error) {
                console.log(error)
            }

            // 判断加载提示

            // 处理URL
            let url = '/solution-ppm/api/v2/built-in-system-ppm/project/add/projectMenu'
            // 替换url中的变量

            // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
            Object.keys(params).forEach(key => {
                if (params[key] === null) {
                    delete params[key]
                } else if (Object.prototype.toString.call(params[key]) === '[object Object]') {
                    Object.keys(params[key]).forEach(childKey => {
                        if (
                            params[key][childKey] === null ||
                            (Array.isArray(params[key][childKey]) &&
                                params[key][childKey].length === 1 &&
                                isNullOrUnDef(params[key][childKey]?.[0]))
                        ) {
                            delete params[key][childKey]
                        }
                    })
                }
            })
            return post(url, params, {
                headers: undefined
            })
                .then(async resp => {
                    dataConnector_conn_xmaiizwhix_response.value = resp

                    return resp
                })
                .catch(async e => {
                    return Promise.reject(e)
                })
                .finally(async () => {})
        }

        return await exec()
    }

    // 页面数据 删除项目菜单
    const dataConnector_conn_5uzzulahxl_response = ref()
    const dataConnector_conn_5uzzulahxl = async (additionParams = {}) => {
        const exec = async () => {
            // 获取参数
            const params = {}

            // 注入附加的参数
            try {
                merge(params, additionParams)
            } catch (error) {
                console.log(error)
            }

            // 判断加载提示

            // 处理URL
            let url = '/solution-ppm/api/v2/built-in-system-ppm/project/menu/{projectId}'
            // 替换url中的变量
            url = url.replace('{projectId}', String(vid_kojlvo03hy_props?.currentRow.projectId))
            // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
            Object.keys(params).forEach(key => {
                if (params[key] === null) {
                    delete params[key]
                } else if (Object.prototype.toString.call(params[key]) === '[object Object]') {
                    Object.keys(params[key]).forEach(childKey => {
                        if (
                            params[key][childKey] === null ||
                            (Array.isArray(params[key][childKey]) &&
                                params[key][childKey].length === 1 &&
                                isNullOrUnDef(params[key][childKey]?.[0]))
                        ) {
                            delete params[key][childKey]
                        }
                    })
                }
            })
            return del(
                url,
                { data: params },
                {
                    headers: undefined
                }
            )
                .then(async resp => {
                    dataConnector_conn_5uzzulahxl_response.value = resp

                    return resp
                })
                .catch(async e => {
                    return Promise.reject(e)
                })
                .finally(async () => {})
        }

        return await exec()
    }

    // 页面数据 全部项目菜单
    const dataConnector_conn_tkjh98vg71_response = ref()
    const dataConnector_conn_tkjh98vg71 = async (additionParams = {}) => {
        const exec = async () => {
            // 获取参数
            const params = {
                modifiedTime: undefined,
                salerName: undefined,
                deliveryTime: undefined,
                departmentId: undefined,
                projectType: undefined,
                description: undefined,
                pageSize: vid_kojlvo03hy_props?.rt_tableConfig.pagination.pageSize,
                delFlag: undefined,
                preSalesCode: undefined,
                plName: undefined,
                projectStakeholders: undefined,
                attachment: undefined,
                projectCode: undefined,
                updateBy: undefined,
                pageNo: vid_kojlvo03hy_props?.rt_tableConfig.pagination.current,
                createdTime: undefined,
                startTime: undefined,
                deliverCode: undefined,
                taskStatus: undefined,
                departmentName: undefined,
                ppmProjectFormList: undefined,
                projectNumber: undefined,
                acceptanceTime: undefined,
                updateTime: undefined,
                pmName: undefined,
                nodeType: undefined,
                parentId: undefined,
                ppmEnclosureInfoList: undefined,
                createBy: undefined,
                createTime: undefined,
                endTime: undefined,
                projectName: vid_90gelfzben_props?.selected.value,
                salerNames: undefined,
                projectId: undefined
            }

            // 注入附加的参数
            try {
                merge(params, additionParams)
            } catch (error) {
                console.log(error)
            }

            // 判断加载提示

            // 处理URL
            let url = '/solution-ppm/api/v2/built-in-system-ppm/project/menuList'
            // 替换url中的变量

            // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
            Object.keys(params).forEach(key => {
                if (params[key] === null) {
                    delete params[key]
                } else if (Object.prototype.toString.call(params[key]) === '[object Object]') {
                    Object.keys(params[key]).forEach(childKey => {
                        if (
                            params[key][childKey] === null ||
                            (Array.isArray(params[key][childKey]) &&
                                params[key][childKey].length === 1 &&
                                isNullOrUnDef(params[key][childKey]?.[0]))
                        ) {
                            delete params[key][childKey]
                        }
                    })
                }
            })
            return post(url, params, {
                headers: undefined
            })
                .then(async resp => {
                    dataConnector_conn_tkjh98vg71_response.value = resp

                    return resp
                })
                .catch(async e => {
                    return Promise.reject(e)
                })
                .finally(async () => {})
        }

        return await exec()
    }

    // 页面数据 项目菜单编辑回显
    const dataConnector_conn_dyb5o4f36o_response = ref()
    const dataConnector_conn_dyb5o4f36o = async (additionParams = {}) => {
        const exec = async () => {
            // 获取参数
            const params = {
                modifiedTime: undefined,
                salerName: undefined,
                deliveryTime: undefined,
                departmentId: undefined,
                projectType: undefined,
                description: undefined,
                pageSize: undefined,
                delFlag: undefined,
                preSalesCode: undefined,
                plName: undefined,
                projectStakeholders: undefined,
                attachment: undefined,
                projectCode: undefined,
                updateBy: undefined,
                pageNo: undefined,
                createdTime: undefined,
                startTime: undefined,
                deliverCode: undefined,
                taskStatus: undefined,
                departmentName: undefined,
                ppmProjectFormList: undefined,
                projectNumber: undefined,
                acceptanceTime: undefined,
                updateTime: undefined,
                pmName: undefined,
                nodeType: undefined,
                parentId: undefined,
                ppmEnclosureInfoList: undefined,
                createBy: undefined,
                createTime: undefined,
                endTime: undefined,
                projectName: undefined,
                salerNames: undefined,
                projectId: vid_kojlvo03hy_props?.currentRow.projectId
            }

            // 注入附加的参数
            try {
                merge(params, additionParams)
            } catch (error) {
                console.log(error)
            }

            // 判断加载提示

            // 处理URL
            let url = '/solution-ppm/api/v2/built-in-system-ppm/project/menu/getPpmProjectMenu'
            // 替换url中的变量

            // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
            Object.keys(params).forEach(key => {
                if (params[key] === null) {
                    delete params[key]
                } else if (Object.prototype.toString.call(params[key]) === '[object Object]') {
                    Object.keys(params[key]).forEach(childKey => {
                        if (
                            params[key][childKey] === null ||
                            (Array.isArray(params[key][childKey]) &&
                                params[key][childKey].length === 1 &&
                                isNullOrUnDef(params[key][childKey]?.[0]))
                        ) {
                            delete params[key][childKey]
                        }
                    })
                }
            })
            return post(url, params, {
                headers: undefined
            })
                .then(async resp => {
                    dataConnector_conn_dyb5o4f36o_response.value = resp

                    return resp
                })
                .catch(async e => {
                    return Promise.reject(e)
                })
                .finally(async () => {})
        }

        return await exec()
    }

    // 页面数据 修改项目菜单
    const dataConnector_conn_ytfktw7sxv_response = ref()
    const dataConnector_conn_ytfktw7sxv = async (additionParams = {}) => {
        const exec = async () => {
            // 获取参数
            const params = {
                modifiedTime: undefined,
                salerName: undefined,
                deliveryTime: undefined,
                departmentId: undefined,
                projectType: undefined,
                description: undefined,
                pageSize: undefined,
                delFlag: undefined,
                preSalesCode: undefined,
                plName: undefined,
                projectStakeholders: undefined,
                attachment: undefined,
                projectCode: undefined,
                updateBy: undefined,
                pageNo: undefined,
                createdTime: undefined,
                startTime: undefined,
                deliverCode: undefined,
                taskStatus: undefined,
                departmentName: undefined,
                ppmProjectFormList: undefined,
                projectNumber: undefined,
                acceptanceTime: undefined,
                updateTime: undefined,
                pmName: undefined,
                nodeType: undefined,
                parentId: vid_lrhlm57xoi_props?.selected.value,
                ppmEnclosureInfoList: undefined,
                createBy: undefined,
                createTime: undefined,
                endTime: undefined,
                projectName: t_fkosa1khu3.k_8jcaxipcmd,
                salerNames: undefined,
                projectId: vid_kojlvo03hy_props?.currentRow.projectId
            }

            // 注入附加的参数
            try {
                merge(params, additionParams)
            } catch (error) {
                console.log(error)
            }

            // 判断加载提示

            // 处理URL
            let url = '/solution-ppm/api/v2/built-in-system-ppm/project/edit/projectMenu'
            // 替换url中的变量

            // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
            Object.keys(params).forEach(key => {
                if (params[key] === null) {
                    delete params[key]
                } else if (Object.prototype.toString.call(params[key]) === '[object Object]') {
                    Object.keys(params[key]).forEach(childKey => {
                        if (
                            params[key][childKey] === null ||
                            (Array.isArray(params[key][childKey]) &&
                                params[key][childKey].length === 1 &&
                                isNullOrUnDef(params[key][childKey]?.[0]))
                        ) {
                            delete params[key][childKey]
                        }
                    })
                }
            })
            return post(url, params, {
                headers: undefined
            })
                .then(async resp => {
                    dataConnector_conn_ytfktw7sxv_response.value = resp

                    return resp
                })
                .catch(async e => {
                    return Promise.reject(e)
                })
                .finally(async () => {})
        }

        return await exec()
    }

    // 页面数据 全部项目菜单(2023.2.16)
    const dataConnector_conn_nmraqqi540_response = ref()
    const dataConnector_conn_nmraqqi540 = async (additionParams = {}) => {
        const exec = async () => {
            // 获取参数
            const params = {
                modifiedTime: undefined,
                orderType: undefined,
                salerName: undefined,
                deliveryTime: undefined,
                departmentId: undefined,
                projectType: undefined,
                description: undefined,
                pageSize: vid_kojlvo03hy_props?.rt_tableConfig.pagination.pageSize,
                delFlag: undefined,
                preSalesCode: undefined,
                plName: undefined,
                projectStakeholders: undefined,
                attachment: undefined,
                projectCode: undefined,
                updateBy: undefined,
                pageNo: vid_kojlvo03hy_props?.rt_tableConfig.pagination.current,
                createdTime: undefined,
                startTime: undefined,
                deliverCode: undefined,
                taskStatus: undefined,
                departmentName: undefined,
                ppmProjectFormList: undefined,
                projectNumber: undefined,
                acceptanceTime: undefined,
                updateTime: undefined,
                pmName: undefined,
                sort: vid_kojlvo03hy_props?.sorter,
                nodeType: undefined,
                parentId: undefined,
                ppmEnclosureInfoList: undefined,
                createBy: undefined,
                createTime: undefined,
                endTime: undefined,
                orderField: undefined,
                projectName: vid_90gelfzben_props?.selected.label,
                salerNames: undefined,
                projectId: undefined
            }

            // 注入附加的参数
            try {
                merge(params, additionParams)
            } catch (error) {
                console.log(error)
            }

            // 判断加载提示

            // 处理URL
            let url = '/solution-ppm/api/v2/built-in-system-ppm/project/menuList'
            // 替换url中的变量

            // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
            Object.keys(params).forEach(key => {
                if (params[key] === null) {
                    delete params[key]
                } else if (Object.prototype.toString.call(params[key]) === '[object Object]') {
                    Object.keys(params[key]).forEach(childKey => {
                        if (
                            params[key][childKey] === null ||
                            (Array.isArray(params[key][childKey]) &&
                                params[key][childKey].length === 1 &&
                                isNullOrUnDef(params[key][childKey]?.[0]))
                        ) {
                            delete params[key][childKey]
                        }
                    })
                }
            })
            return post(url, params, {
                headers: undefined
            })
                .then(async resp => {
                    dataConnector_conn_nmraqqi540_response.value = resp

                    return resp
                })
                .catch(async e => {
                    return Promise.reject(e)
                })
                .finally(async () => {})
        }

        return await exec()
    }

    /* ========================== 页面数据 ========================== */

    /* -------------------------- 响应 -------------------------- */

    /* ========================== 响应 ========================== */

    /* -------------------------- 函数 -------------------------- */

    // 自定义函数 新建权限
    const customFunction_e6tsnqvivs = async params => {
        get(`/solution-ppm/api/v2/built-in-system-ppm/permission/xmcd/create`).then(({ data }) => {
            console.log(data)
            if (data === false) {
                message.info('暂无权限')
                return Promise.reject()
            } else {
                return Promise.resolve()
            }
        })
    }

    // 自定义函数 删除权限
    const customFunction_mvdzpbw3e8 = async params => {
        get(`/solution-ppm/api/v2/built-in-system-ppm/permission/xmcd/remove`).then(({ data }) => {
            console.log(data)
            if (data === false) {
                message.info('暂无权限')
                return Promise.reject()
            } else {
                return Promise.resolve()
            }
        })
    }

    // 自定义函数 重置
    const customFunction_5thswbu2ak = params => {
        vid_5mtxzq13ji_props.selected.label = ''
        vid_5mtxzq13ji_props.selected.value = ''
        vid_90gelfzben_props.selected.label = ""
    }

    /* ========================== 函数 ========================== */

    /* -------------------------- 页面参数 -------------------------- */

    const pageParameter_state = reactive({
        'processInstanceId': props.processInstanceId ?? route.query.processInstanceId
    })

    /* ========================== 页面参数 ========================== */

    /* -------------------------- 组件事件处理方法 -------------------------- */

    // ---------------------------- 组件数据同步 ----------------------------
    // 处理 下拉框_0edvz0tgg9 的 systemList 属性关联
    watch(
        () => dataConnector_conn_a0exqfve8p_response?.value?.dataList,
        () => {
            let dataList = dataConnector_conn_a0exqfve8p_response?.value?.dataList

            // 处理零代码生成的表格数据，将dataList展开
            const data = dataConnector_conn_a0exqfve8p_response?.value
            if (data && 'dataList' in data && 'columnList' in data) {
                const newDataList = parseSubFromDataList(dataList)
                if (newDataList.length) {
                    dataList = newDataList
                }
            }

            vid_5mtxzq13ji_options_raw.value = dataList
        },
        { deep: true }
    )
    // 处理 编辑-父级菜单 的 systemList 属性关联
    watch(
        () => dataConnector_conn_a0exqfve8p_response?.value?.dataList,
        () => {
            let dataList = dataConnector_conn_a0exqfve8p_response?.value?.dataList

            // 处理零代码生成的表格数据，将dataList展开
            const data = dataConnector_conn_a0exqfve8p_response?.value
            if (data && 'dataList' in data && 'columnList' in data) {
                const newDataList = parseSubFromDataList(dataList)
                if (newDataList.length) {
                    dataList = newDataList
                }
            }

            vid_lrhlm57xoi_options_raw.value = dataList
        },
        { deep: true }
    )

    // 处理 编辑-父级菜单 的 value 属性关联
    watch(
        () => dataConnector_conn_dyb5o4f36o_response?.value?.dataList?.[0]?.parentName,
        () => {
            let dataList = dataConnector_conn_dyb5o4f36o_response?.value?.dataList?.[0]?.parentName

            // 处理零代码生成的表格数据，将dataList展开
            const data = dataConnector_conn_dyb5o4f36o_response?.value?.[0]?.parentName
            if (data && 'dataList' in data && 'columnList' in data) {
                const newDataList = parseSubFromDataList(dataList)
                if (newDataList.length) {
                    dataList = newDataList
                }
            }

            t_fkosa1khu3.y_afk8lvgals = dataList
        },
        { deep: true }
    )
    // 处理 编辑-菜单名称 的 value 属性关联
    watch(
        () => dataConnector_conn_dyb5o4f36o_response?.value?.dataList?.[0]?.projectName,
        () => {
            let dataList = dataConnector_conn_dyb5o4f36o_response?.value?.dataList?.[0]?.projectName

            // 处理零代码生成的表格数据，将dataList展开
            const data = dataConnector_conn_dyb5o4f36o_response?.value?.[0]?.projectName
            if (data && 'dataList' in data && 'columnList' in data) {
                const newDataList = parseSubFromDataList(dataList)
                if (newDataList.length) {
                    dataList = newDataList
                }
            }

            t_fkosa1khu3.k_8jcaxipcmd = dataList
        },
        { deep: true }
    )
    // 处理 筛选菜单名称 的 systemList 属性关联
    watch(
        () => dataConnector_conn_a0exqfve8p_response?.value?.dataList,
        () => {
            let dataList = dataConnector_conn_a0exqfve8p_response?.value?.dataList

            // 处理零代码生成的表格数据，将dataList展开
            const data = dataConnector_conn_a0exqfve8p_response?.value
            if (data && 'dataList' in data && 'columnList' in data) {
                const newDataList = parseSubFromDataList(dataList)
                if (newDataList.length) {
                    dataList = newDataList
                }
            }

            vid_90gelfzben_options_raw.value = dataList
        },
        { deep: true }
    )
    // 处理 项目菜单表格 的 systemList 属性关联
    watch(
        () => dataConnector_conn_nmraqqi540_response?.value?.dataList,
        () => {
            let dataList = dataConnector_conn_nmraqqi540_response?.value?.dataList

            // 处理零代码生成的表格数据，将dataList展开
            const data = dataConnector_conn_nmraqqi540_response?.value
            if (data && 'dataList' in data && 'columnList' in data) {
                const newDataList = parseSubFromDataList(dataList)
                if (newDataList.length) {
                    dataList = newDataList
                }
            }

            vid_kojlvo03hy_options_raw.value = dataList
        },
        { deep: true }
    )
    // 处理 项目菜单表格 的 totalNumber 属性关联
    watch(
        () => dataConnector_conn_nmraqqi540_response?.value?.totalElements,
        () => {
            let dataList = dataConnector_conn_nmraqqi540_response?.value?.totalElements

            vid_kojlvo03hy_props.totalNumber = dataList
        },
        { deep: true }
    )
    // ============================ 组件数据同步 ============================

    /**
     * 处理元素 对话框 的 cancel 事件
     */
    let handle_vid_c9qmws388m_cancel = throttle(async (...params) => {}, 500)
    /**
     * 处理元素 对话框 的 ok 事件
     */
    let handle_vid_c9qmws388m_ok = throttle(async (...params) => {
        vid_c9qmws388m_props.visible = false
        await dataConnector_conn_5uzzulahxl()
        await dataConnector_conn_nmraqqi540()
    }, 500)
    /**
     * 处理元素 对话框 的 cancel 事件
     */
    let handle_vid_87aoh1zr33_cancel = throttle(async (...params) => {
        vid_87aoh1zr33_props.visible = false
    }, 500)
    /**
     * 处理元素 对话框 的 ok 事件
     */
    let handle_vid_87aoh1zr33_ok = throttle(async (...params) => {
        // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
        await vid_ksilstvcwn_ref.value?.validate()
        vid_87aoh1zr33_props.visible = false
        await dataConnector_conn_xmaiizwhix()
        await dataConnector_conn_nmraqqi540()
        // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
        vid_fr3x0wobcc_ref.value?.reset()
        await dataConnector_conn_a0exqfve8p()
    }, 500)
    /**
     * 处理元素 下拉框 的 change 事件
     */
    let handle_vid_5mtxzq13ji_change = throttle(async (...params) => {
        const [, option] = params
        vid_5mtxzq13ji_props.selected.label = option?.label
        vid_5mtxzq13ji_props.selected.value = option?.value
        vid_5mtxzq13ji_props.selected.option = option
        vid_5mtxzq13ji_props.selected.optionArray = [{ label: option?.label, value: option?.value }]
    }, 500)
    /**
     * 处理元素 下拉框 的 search 事件
     */
    let handle_vid_5mtxzq13ji_search = throttle(async (...params) => {
        const [searchValue] = params
        vid_5mtxzq13ji_props.searchValue = searchValue
    }, 500)
    /**
     * 处理元素 对话框 的 cancel 事件
     */
    let handle_vid_wyzo0u316u_cancel = throttle(async (...params) => {
        vid_wyzo0u316u_props.visible = false
        // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
        try {
            await vid_2pb9u9mnm9_ref.value?.resetFields()
        } catch (error) {
            console.log(error)
        }
    }, 500)
    /**
     * 处理元素 对话框 的 ok 事件
     */
    let handle_vid_wyzo0u316u_ok = throttle(async (...params) => {
        // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
        await vid_2pb9u9mnm9_ref.value?.validate()
        vid_wyzo0u316u_props.visible = false
        await dataConnector_conn_ytfktw7sxv()
        await dataConnector_conn_nmraqqi540()
    }, 500)
    /**
     * 处理元素 下拉框 的 change 事件
     */
    let handle_vid_lrhlm57xoi_change = throttle(async (...params) => {
        const [, option] = params
        vid_lrhlm57xoi_props.selected.label = option?.label
        vid_lrhlm57xoi_props.selected.value = option?.value
        vid_lrhlm57xoi_props.selected.option = option
        vid_lrhlm57xoi_props.selected.optionArray = [{ label: option?.label, value: option?.value }]
    }, 500)
    /**
     * 处理元素 下拉框 的 search 事件
     */
    let handle_vid_lrhlm57xoi_search = throttle(async (...params) => {
        const [searchValue] = params
        vid_lrhlm57xoi_props.searchValue = searchValue
    }, 500)
    /**
     * 处理元素 按钮 的 click 事件
     */
    let handle_vid_7kivq6lkr0_click = throttle(async (...params) => {
        await dataConnector_conn_nmraqqi540()
    }, 500)
    /**
     * 处理元素 按钮 的 click 事件
     */
    let handle_vid_0lxg6f0wv1_click = throttle(async (...params) => {
        // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
        try {
            await vid_pqhid1j9xl_ref.value?.resetFields()
        } catch (error) {
            console.log(error)
        }
        customFunction_5thswbu2ak()
        await dataConnector_conn_nmraqqi540()
    }, 500)
    /**
     * 处理元素 下拉框 的 change 事件
     */
    let handle_vid_90gelfzben_change = throttle(async (...params) => {
        const [, option] = params
        vid_90gelfzben_props.selected.label = option?.label
        vid_90gelfzben_props.selected.value = option?.value
        vid_90gelfzben_props.selected.option = option
        vid_90gelfzben_props.selected.optionArray = [{ label: option?.label, value: option?.value }]
    }, 500)
    /**
     * 处理元素 下拉框 的 search 事件
     */
    let handle_vid_90gelfzben_search = throttle(async (...params) => {
        const [searchValue] = params
        vid_90gelfzben_props.searchValue = searchValue
    }, 500)
    /**
     * 处理元素 按钮 的 click 事件
     */
    let handle_vid_t1518w6pxe_click = throttle(async (...params) => {
        await customFunction_e6tsnqvivs()
        vid_87aoh1zr33_props.visible = true
    }, 500)
    /**
     * 处理元素 表格 的 clickBtn_h1xqwdg2zp 事件
     */
    let handle_vid_kojlvo03hy_clickBtn_h1xqwdg2zp = throttle(async (...params) => {
        // 存储表格当前行数据
        const [record] = params
        vid_kojlvo03hy_props.currentRow = record
        vid_wyzo0u316u_props.visible = true
        await dataConnector_conn_dyb5o4f36o()
    }, 500)
    /**
     * 处理元素 表格 的 clickBtn_7qr0xhf0yl 事件
     */
    let handle_vid_kojlvo03hy_clickBtn_7qr0xhf0yl = throttle(async (...params) => {
        // 存储表格当前行数据
        const [record] = params
        vid_kojlvo03hy_props.currentRow = record
        await customFunction_mvdzpbw3e8()
        vid_c9qmws388m_props.visible = true
    }, 500)
    /**
     * 处理元素 表格 的 change 事件
     */
    let handle_vid_kojlvo03hy_change = throttle(async (...params) => {
        // 处理分页器相关数据
        const [pagination, filters, sorter] = params
        const { current, pageSize } = pagination
        vid_kojlvo03hy_props.rt_tableConfig.pagination.current = current
        vid_kojlvo03hy_props.rt_tableConfig.pagination.pageSize = pageSize
        // 处理排序相关数据
        const { field, order } = sorter
        const sorterList = [...vid_kojlvo03hy_props.rowMergeSort]
        let sorterValue = {}
        if (order === 'descend') {
            sorterValue = { order: field, direction: 'DESC' }
        } else if (order === 'ascend') {
            sorterValue = { order: field, direction: 'ASC' }
        }
        sorterList.push(sorterValue)
        vid_kojlvo03hy_props.systemSort = sorterList
        vid_kojlvo03hy_props.sorter = sorterValue
        await dataConnector_conn_nmraqqi540()
    }, 500)
    /**
     * 处理元素 表格 的 clickBtn_618nczp094 事件
     */
    let handle_vid_kojlvo03hy_clickBtn_618nczp094 = throttle(async (...params) => {
        // 存储表格当前行数据
        const [record] = params
        vid_kojlvo03hy_props.currentRow = record
    }, 500)
    /**
     * 处理元素 表格 的 clickBtn_7g3axf94vl 事件
     */
    let handle_vid_kojlvo03hy_clickBtn_7g3axf94vl = throttle(async (...params) => {
        // 存储表格当前行数据
        const [record] = params
        vid_kojlvo03hy_props.currentRow = record
    }, 500)
    /**
     * 处理元素 表格 的 clickBtn_4qycpviahw 事件
     */
    let handle_vid_kojlvo03hy_clickBtn_4qycpviahw = throttle(async (...params) => {
        // 存储表格当前行数据
        const [record] = params
        vid_kojlvo03hy_props.currentRow = record
    }, 500)
    /* ========================== 组件事件处理方法 ========================== */

    /* -------------------------- 生命周期 -------------------------- */
    // 用于参数变更后重新执行自定义指令
    const queryUpdateFlag = ref(0)
    onMounted(() => {
        dataConnector_conn_a0exqfve8p()
        dataConnector_conn_tkjh98vg71()
        dataConnector_conn_nmraqqi540()
    })

    onUnmounted(() => {
        // 销毁定时器
        setTimeOutList.forEach(({ repeat, timer }) => {
            repeat ? clearInterval(timer) : clearTimeout(timer)
        })
    })

    /* ========================== 生命周期 ========================== */

    /* -------------------------- 数据关联处理 -------------------------- */

    // 处理 全局提示_新建菜单成功 全局消息
    immediateWatch(
        () => vid_x8nwwx4hgr_props.show,
        () => {
            if (vid_x8nwwx4hgr_props.show) {
                message[vid_x8nwwx4hgr_props.type](vid_x8nwwx4hgr_props.content, vid_x8nwwx4hgr_props.duration, () => {
                    vid_x8nwwx4hgr_props.show = false
                })
            }
        }
    )
    // 处理 全局提示_新建菜单失败 全局消息
    immediateWatch(
        () => vid_47bbbopx7s_props.show,
        () => {
            if (vid_47bbbopx7s_props.show) {
                message[vid_47bbbopx7s_props.type](vid_47bbbopx7s_props.content, vid_47bbbopx7s_props.duration, () => {
                    vid_47bbbopx7s_props.show = false
                })
            }
        }
    )

    /* -------------------------- 表单数据同步 -------------------------- */
    /* ========================== 表单数据同步 ========================== */

    /* ========================== 数据关联处理 ========================== */

    /* -------------------------- 不同组件自定义的处理逻辑 -------------------------- */
    immediateWatch(
        () => [w_ujbi2r2ksq?.parentId, vid_5mtxzq13ji_options?.value()],
        () => {
            if (!!handle_vid_5mtxzq13ji_change) {
                const options = (vid_5mtxzq13ji_options?.value() || []).find(
                    item => item.value === w_ujbi2r2ksq?.parentId || item.label === w_ujbi2r2ksq?.parentId
                )
                if (!options) {
                    return
                }
                // 重置了表单，这里重置下拉框
                handle_vid_5mtxzq13ji_change(w_ujbi2r2ksq?.parentId, { ...options } || {})
            }
        }
    )
    immediateWatch(
        () => [t_fkosa1khu3?.y_afk8lvgals, vid_lrhlm57xoi_options?.value()],
        () => {
            if (!!handle_vid_lrhlm57xoi_change) {
                const options = (vid_lrhlm57xoi_options?.value() || []).find(
                    item => item.value === t_fkosa1khu3?.y_afk8lvgals || item.label === t_fkosa1khu3?.y_afk8lvgals
                )
                if (!options) {
                    return
                }
                // 重置了表单，这里重置下拉框
                handle_vid_lrhlm57xoi_change(t_fkosa1khu3?.y_afk8lvgals, { ...options } || {})
            }
        }
    )
    immediateWatch(
        () => [h_4si95erbps?.h_k7wv7blab2, vid_90gelfzben_options?.value()],
        () => {
            if (!!handle_vid_90gelfzben_change) {
                const options = (vid_90gelfzben_options?.value() || []).find(
                    item => item.value === h_4si95erbps?.h_k7wv7blab2 || item.label === h_4si95erbps?.h_k7wv7blab2
                )
                if (!options) {
                    return
                }
                // 重置了表单，这里重置下拉框
                handle_vid_90gelfzben_change(h_4si95erbps?.h_k7wv7blab2, { ...options } || {})
            }
        }
    )
    onMounted(() => {
        const rawColumnList = []
        traversalTreeStructure(vid_kojlvo03hy_props.columnList, node => {
            if (node.type === 'column') {
                rawColumnList.push(node)
            }
        })
        /*** PUBLISH_EXEGESIS ***
     // 获取缓存的表格列宽度，处理列宽信息
     UserTableRecords.getTableRecords(localGet('al__UID')).then((res) => {
     const columnWidthMap = res['vid_kojlvo03hy'] ?? {};
     rawColumnList.map((column) => {
     if(columnWidthMap[column.dataIndex]) {
     column.width = columnWidthMap[column.dataIndex]
     }
     })
     });
     *** PUBLISH_EXEGESIS ***/
        vid_kojlvo03hy_props.rawColumnList = rawColumnList
    })
    // 生成表格列：相同分组的数据需要合并单元格
    const vid_kojlvo03hy_columns = computed(() => {
        // 需要合并单元格的列
        const groupKeys = []

        // 将表头配置按照groupTitle字段进行分组，以实现多级表头
        const columnList = [...vid_kojlvo03hy_props.columnList]
        function formatColumns(columns) {
            columns.forEach(item => {
                const { dataIndex, contentAlign, children, customCellStyle } = item
                // 如果当前列是分组列，则递归处理它的子列，当前列本身不作处理
                if (!dataIndex && children && children.length) {
                    formatColumns(children)
                    return
                }

                const groupIndex = groupKeys.findIndex(item => item === dataIndex)
                // 如果当前字段属于分组字段，则给它添加合并单元格的配置，否则直接返回
                if (groupIndex === -1) {
                    item.customCell = (record, index) => {
                        return { style: { 'text-align': contentAlign, ...(customCellStyle || {}) } }
                    }
                } else {
                    item.customCell = (record, index) => {
                        const rowGroupKeys = groupKeys.slice(0, groupIndex + 1)
                        const rowSpanList = generateRowSpanList(
                            vid_kojlvo03hy_options.value(),
                            rowGroupKeys,
                            vid_kojlvo03hy_props.editRecordMap
                        )
                        return {
                            rowSpan: rowSpanList[index],
                            style: { 'text-align': contentAlign, ...(customCellStyle || {}) }
                        }
                    }
                }
            })
        }

        // 格式化column：增加合并单元格的配置，以及自定义样式
        formatColumns(columnList)

        return columnList
    })

    // 表格分页器信息：将总条数信息加到基础分页信息中
    const vid_kojlvo03hy_pagination = computed(() => {
        const { totalNumber, rt_tableConfig } = vid_kojlvo03hy_props
        const {
            enable = true,
            current = 1,
            pageSize = 10,
            showSizeChanger = false,
            pageSizeOptions = '10,20,30,40',
            showTotal = false,
            showQuickJumper = false,
            simple = false,
            hideOnSinglePage = false
        } = rt_tableConfig.pagination ?? {}
        const { size = 'default', layout = 'bottomRight' } = rt_tableConfig?.style?.paginationStyle || {}
        let info = {}
        if (enable) {
            info = {
                total: totalNumber || 0,
                pageSize,
                size,
                simple,
                current,
                showSizeChanger,
                pageSizeOptions: pageSizeOptions.split(','),
                showQuickJumper,
                hideOnSinglePage,
                position: [layout]
            }
            if (showTotal) {
                info.showTotal = (total, range) => `共${total}个项目，第${current}/${Math.ceil(total / pageSize)}页`
            }
            return info
        }
        return false
    })

    // 补充一个watch，用于监听删除最后一页最后一条数据的情况，然后重新加载数据
    watch(
        () => dataConnector_conn_nmraqqi540_response?.value?.dataList,
        newValue => {
            const current = vid_kojlvo03hy_props.rt_tableConfig.pagination.current
            if (!newValue?.length && current > 1) {
                vid_kojlvo03hy_props.rt_tableConfig.pagination.current = current - 1
                dataConnector_conn_nmraqqi540()
            }
        }
    )
    /**
     * 生成分组字段合并单元格的配置：返回值为一个数字数组，数组里面每一项即为该字段当前行的rowSpan配置
     * @param {Array} 表格中的数据
     * @param {Array} 当前分组字段的列表，注：为了保证优先级低的字段合并后是优先级高的字段合并后的子集，需要把比该字段优先级高的分组字段按顺序放在该字段前面；例如：所有分组字段列表为['grade', 'age', 'score']，要生成age字段的合并单元格配置，则该参数需要传['grade', 'age']
     * @returns {Array} 该字段合并单元格的rowSpan配置，例：[1, 1, 2, 0, 1]
     */
    function generateRowSpanList(dataSource, groupKeys, editRecordMap) {
        if (!dataSource || !dataSource.length) {
            return []
        }

        const rowSpanList = []

        // 判断单元格是否需要合并的临时值：使用表格数据最后一行进行初始化（表格数据的遍历是倒序进行的）
        let tempValue = getGroupValue(dataSource[dataSource.length - 1], groupKeys)
        // 记录需要合并单元格的数量
        let tempValueCount = 0

        // 倒序遍历数组，以保证使用最前面一条数据合并单元格
        for (let index = dataSource.length - 1; index >= 0; index--) {
            rowSpanList[index] = 0
            const groupValue = getGroupValue(dataSource[index], groupKeys)
            // 如果当前行的分组数据跟上一行一致，则将标记数量加一；否则将标记数量的当前值赋给上一条数据，并重置临时值和标记数量
            if (editRecordMap && editRecordMap[index]) {
                //如果当前行是编辑行
                rowSpanList[index + 1] = tempValueCount
                tempValue = ''
                tempValueCount = 1
            } else if (groupValue === tempValue) {
                tempValueCount++
            } else {
                rowSpanList[index + 1] = tempValueCount
                tempValue = groupValue
                tempValueCount = 1
            }

            // 遍历到最后一行，将当前的标记数量赋给当前行
            if (index === 0) {
                rowSpanList[index] = tempValueCount
            }
        }

        return rowSpanList
    }

    /**
     * 根据分组字段列表生成当前数据行的分组值
     * @param {Object} 当前数据行
     * @param {Array} 分组字段列表
     * @returns {String} 拼装的当前数据行的分组值，例：record为{ age: 7, grade: '一年级', name: '小赵' }，groupKeys为['grade', 'age']，则拼装后的返回值为'一年级__$__7'
     */
    function getGroupValue(record, groupKeys) {
        const groupValueList = []
        groupKeys.forEach(groupKey => {
            let val = record[groupKey]
            if (isArray(val)) {
                val = record[groupKey + '_labels']
            } else if (isObject(val)) {
                console.warn('警告表格列数据为object，可能导致行合并异常，列key为：' + groupKey, val)
            }
            groupValueList.push(`${val}`)
        })
        return groupValueList.join('__$__')
    }

    /**
     * 将列表数据转换成树状数据
     * @param {Array} 原始的列表数据
     * @param {String|Number} 列表数据的唯一key
     * @param {String|Number} 列表数据转成树时的父级id
     */
    function convertListToTree(list, key, parentKey) {
        const clonedList = cloneDeep(list || [])

        // 遍历列表数据，生成树节点的map：key为列表数据的唯一key，value为列表当前行的数据
        const treeNodeMap = {}
        clonedList.forEach(item => {
            treeNodeMap[item[key]] = item
        })

        const treeDataList = []
        clonedList.forEach(item => {
            // 如果当前行数据的父级id不在树节点的map中，则当前数据为根节点数据，将其加入最终树形数据的列表；否则将其放入其父节点数据的children中
            if (!treeNodeMap[item[parentKey]]) {
                treeDataList.push(item)
            } else {
                if (!treeNodeMap[item[parentKey]].children) {
                    treeNodeMap[item[parentKey]].children = []
                }
                treeNodeMap[item[parentKey]].children.push(item)
            }
        })

        return treeDataList
    }

    /**
     * 表格列宽伸缩处理，使用indexedDB缓存伸缩后的列宽度
     */
    const handleResizeColumn = (w, col, vid) => {
        col.width = w
        /*** PUBLISH_EXEGESIS ***
     UserTableRecords.saveTableRecords(col, localGet('al__UID'), vid)
     *** PUBLISH_EXEGESIS ***/
    }
    /* ========================== 不同组件自定义的处理逻辑 ========================== */

    // ================================定制化逻辑========================================
    const userInfoStorage = localStorage.getItem('al__USER_INFO')
    if (userInfoStorage) {
        try {
            const userInfo = JSON.parse(userInfoStorage)
            vid_xv172q5og0_props.value = userInfo.value.name
        } catch (error) {
            console.log(error)
        }
    }
</script>
<style lang="less" scoped>
    .page_root {
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: #f0f2f5;
    }
    .page_root :deep(.@{ant-prefix}-spin-nested-loading),
    .page_root :deep(.@{ant-prefix}-spin-container) {
        height: 100%;
    }
    .page_root :deep(.@{ant-prefix}-spin-container .@{ant-prefix}-table-wrapper) {
        display: flex;
        flex-flow: column nowrap;
        justify-content: flex-start;
    }
    .page_root :deep(.@{ant-prefix}-table) {
        flex: auto;
        overflow: auto;
    }
    .table-moreBtn_down {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        width: 100px;
    }

    .table-moreBtn_menu :deep(.table-moreBtn_menu-item):hover {
        background: #ebf1ff;
    }

    /*  表格树结构样式处理，展开按钮层级增加*/
    :deep(.@{ant-prefix}-table-row-expand-icon) {
        z-index: 1;
    }
    /*  表格树结构 由于每个表格项采用自定义组件，使用绝对定位布局，开启树结构导致显示异常，暂时使用层级定位位置 */
    :deep(.@{ant-prefix}-table-row-level-1 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 15px !important;
        width: calc(100% - 15px);
    }
    :deep(.@{ant-prefix}-table-row-level-2 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 30px !important;
        width: calc(100% - 30px);
    }
    :deep(.@{ant-prefix}-table-row-level-3 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 45px !important;
        width: calc(100% - 45px);
    }
    :deep(.@{ant-prefix}-table-row-level-4 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
        left: 60px !important;
        width: calc(100% - 60px);
    }

    /* 穿梭框改变默认样式，为根据组件样式控制左右栏宽度。 */
    :deep(.@{ant-prefix}-transfer-list) {
        height: 100%;
        width: 50%;
    }
    .vid_ksilstvcwn {
        width: 100%;
        max-height: 700px;
        overflow-y: auto;
    }
    .vid_j2aucldu17 {
        margin-top: 0px;
        margin-bottom: 0px;
        box-shadow: 0px 0px 0px 0px;
    }
    .vid_fr3x0wobcc {
        display: block;
        box-shadow: 0px 0px 0px 0px;
    }
    .vid_edw9s86602 {
        margin-bottom: 0px;
    }
    .vid_5mtxzq13ji {
        width: 100%;
    }
    .vid_qx4ksiq011 {
        margin-right: 16px;
        margin-bottom: 0px;
    }
    .vid_wyzo0u316u {
        height: 100px;
    }
    .vid_2pb9u9mnm9 {
        width: 100%;
        margin-bottom: 0px;
        padding-left: 0px;
    }
    .vid_cgcgfslucj {
        margin-bottom: 0px;
        padding-bottom: 0px;
    }
    .vid_78u96scdu5 {
        margin-bottom: 0px;
        padding-bottom: 0px;
        border-bottom-style: none;
        border-bottom-width: 1px;
        border-bottom-color: #ebebeb;
    }
    .vid_lrhlm57xoi {
        width: 100%;
    }
    .vid_3sdwc3e0im {
        padding-bottom: 0px;
        border-bottom-style: none;
        border-bottom-color: #ebebeb;
    }
    .vid_31k32tisnj {
        width: 100%;
        height: 100%;
        display: block;
    }
    .vid_pqhid1j9xl {
        margin-bottom: 16px;
        padding-top: 16px;
        padding-right: 24px;
        padding-bottom: 16px;
        padding-left: 24px;
        background-color: #ffffff;
        box-shadow: 0px 0px 0px 0px;
    }
    .vid_hos2yxmizc {
        display: flex;
        flex-wrap: undefined;
        border-bottom-color: #f5f5f5;
    }
    .vid_7kivq6lkr0 {
        margin-left: 24px;
        background-color: #3875ff;
        border-radius: 2px;
    }
    .vid_0lxg6f0wv1 {
        margin-left: 16px;
        box-shadow: 0px 0px 0px 0px;
        border-radius: 2px;
    }
    .vid_w11askucjq {
        width: 100%;
        margin-bottom: 0px;
    }
    .vid_90gelfzben {
        width: 100%;
    }
    .vid_es8qqkl0xe {
        height: 100%;
        display: block;
        padding-right: 24px;
        padding-bottom: 16px;
        padding-left: 24px;
        background-color: #ffffff;
        box-shadow: 0px 0px 0px 0px;
    }
    .vid_6iwz2ocdim {
        display: flex;
        align-items: center;
        flex-wrap: undefined;
        padding-top: 12px;
        padding-bottom: 12px;
        background-color: #ffffff;
    }
    .vid_ipdla4ayd4 {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: undefined;
        margin-bottom: 0px;
        padding-bottom: 0px;
    }
    .vid_ipdla4ayd4:hover {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: undefined;
    }
    .vid_t1518w6pxe {
        background-color: #3875ff;
        border-style: solid;
        border-width: 1px;
        border-color: #3875ff;
        border-radius: 2px;
    }
    .vid_dghk1oe6d2 {
        display: flex;
        align-items: center;
        flex-wrap: undefined;
    }
    .vid_19ogtmwtkw {
        margin-top: 8px;
        padding-left: 8px;
        font-family: arial, helvetica, 'microsoft yahei';
        font-weight: 600;
        color: rgba(38, 38, 38, 1);
        font-size: 16px;
        line-height: 16px;
        border-left-style: solid;
        border-left-width: 4px;
        border-left-color: #3875ff;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-thead) > tr {
        height: 40px;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-thead) > tr > th {
        background: #3875ff;
        font-size: 14px;
        font-family: arial, helvetica, 'microsoft yahei';
        font-weight: 600;
        color: #ffffff;
        border-bottom: 1px solid #d9d9d9;
        padding: 8px 16px;
    }
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered)
        .@{ant-prefix}-table-container
        .@{ant-prefix}-table-thead
        > tr:not(:last-child)
        > th {
        border-bottom: 1px solid #d9d9d9;
    }
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered)
        .@{ant-prefix}-table-container
        .@{ant-prefix}-table-thead
        > tr
        > th {
        border-right: 1px solid #d9d9d9;
    }
    /* 将表格自带的左边框取消，方便设置表头边框颜色和内容边框颜色 */
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container {
        border-left: none;
    }
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered)
        .@{ant-prefix}-table-container
        .@{ant-prefix}-table-thead
        > tr
        > th[colstart='0']:first-child {
        border-left: 1px solid #d9d9d9;
    }
    /* 开启粘性表头后，表格结构会发生变化 需另外处理 */
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered)
        .@{ant-prefix}-table-container
        .@{ant-prefix}-table-header
        table {
        border-top: 1px solid #d9d9d9;
    }
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered)
        .@{ant-prefix}-table-container
        > .@{ant-prefix}-table-content
        > table {
        border-top: 1px solid #d9d9d9;
    }
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table-thead)
        > tr
        > th:not(:last-child):not(.@{ant-prefix}-table-selection-column):not(
            .@{ant-prefix}-table-row-expand-icon-cell
        ):not([colspan])::before {
        background: #d9d9d9;
        width: 1px;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-cell-scrollbar) {
        box-shadow: none;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-tbody) tr {
        height: 40px;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-tbody) tr > td {
        font-size: 14px;
        font-family: arial, helvetica, 'microsoft yahei';
        font-weight: 400;
        color: #262626;
        border-bottom: 1px solid #d9d9d9;
        padding: 0 16px;
        word-break: break-all;
        .cell-wrapper {
            padding: 0 16px;
        }
    }

    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-tbody) tr > td .cell-wrapper {
        padding: 0 16px;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-empty .@{ant-prefix}-table-tbody tr > td) {
        padding: 0;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-tbody) tr > td .@{ant-prefix}-btn {
        padding: 0 30px 0 0;
    }
    .vid_kojlvo03hy :deep(.@{ant-prefix}-table-tbody) tr > td .@{ant-prefix}-btn:last-child {
        padding: 0;
    }
    .vid_kojlvo03hy :deep(.table-striped-odd) td {
        background-color: #ffffff;
    }
    .vid_kojlvo03hy :deep(.table-striped-even) td {
        background-color: #f8fafc;
    }
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered)
        .@{ant-prefix}-table-container
        .@{ant-prefix}-table-tbody
        tr
        > td {
        border-right: 1px solid #d9d9d9;
    }
    .vid_kojlvo03hy
        :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered)
        .@{ant-prefix}-table-container
        .@{ant-prefix}-table-tbody
        tr
        > td:first-child {
        border-left: 1px solid #d9d9d9;
    }
    .vid_kojlvo03hy {
        overflow-x: auto;
        overflow-y: auto;
    }
    .vid_kojlvo03hy:active {
        width: 100%;
    }
    .vid_kojlvo03hy:focus {
        width: 100%;
    }
    .vid_kojlvo03hy:hover {
        width: 100%;
    }

    :deep(.@{ant-prefix}-table-empty .@{ant-prefix}-table-tbody tr > td) {
        padding: 0;
    }
</style>
